package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class SuccessActivity extends AppCompatActivity {
    TextView tv_message;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_success);
        tv_message = findViewById(R.id.tv_message);
        Intent intent = getIntent();
        User user = (User) intent.getSerializableExtra("user");
        tv_message.setText("用户名：" + user.getUsername() + "\n密码：" + user.getPassword() + "\n性别：" + user.getSex() + "\n爱好：" + user.getHobby());
    }
}
